/**
 * The Brik class provides a native interface for dealing directly with the Brik processor.
 * 
 * @author      Steve Montgomery
 * @version     %I%, %G%
 * @since       1.0
 */
public class Brik
{

	/**
	* Part number for Si1000
	*
	*/     
	public final static int SI1000 = 0xD1;
	/**
	* Part number for Si1001
	*
	*/
	public final static int SI1001 = 0xD2; 
	/**
	* Processor normal operating mode
	*
	*/
	public final static int NormalMode = 0; 
	/**
	* Processor idle operating mode
	*
	*/
	public final static int IdleMode = 1; 
	/**
	* Processor stop operating mode
	*
	*/
	public final static int StopMode = 2; 
	/**
	* Processor suspend operating mode
	*
	*/
	public final static int SuspendMode = 3;
	 /**
	* Processor sleep operating mode
	*
	*/	
	public final static int SleepMode = 4;

 	/**
	* Precision internal oscillator source
	*
	*/	
	public final static int PRECINT = 0; 
	/**
	* Low power internal oscillator source
	*
	*/	
	public final static int LPINT = 1; 
	/**
	* External oscillator source
	*
	*/
	public final static int EXT = 2; 
	/**
	* RTC oscillator source
	*
	*/
	public final static int RTC = 3;	 
	/**
	* CMOS external oscillator mode
	*
	*/
	public final static int CMOS = 0; 
	/**
	* CMOS external oscillator mode with divide by 2 stage
	*
	*/
	public final static int CMOSDIV2 = 1; 
	/**
	* RC external oscillator mode
	*
	*/
	public final static int RC = 2; 
	/**
	* Capacitor external oscillator mode
	*
	*/
	public final static int CAPOSC = 3; 
	/**
	* Crystal external oscillator mode
	*
	*/
	public final static int XTOSC = 4;
 
	/**
	* Crystal external oscillator mode with divide by 2 stage
	*
	*/
	public final static int XTOSCDIV2 = 5;
     
	/**
	* Wake up reason == Power On Reset
	*
	*/	
	public final static int WakeOnPOR = 0; 
	/**
	* Wake up reason == Watchdog timeout
	*
	*/	
	public final static int WakeOnWatchdog = 1;
  
	/**
	 * Sets the power mode of the processor
	 *
	 * @param powerMode Power mode of the processor
	 */
	public static native void SetPowerMode(int powerMode);
  
	/**
	 * Gets the part number of the SiLabs chip in the Brik.
	 *
	 * @returns Part number enumeration
	 */    
	public static native int GetPartNumber();

  
	/**
	 * Sets the system clock divisor
	 *
	 * @param div Clock divisor.  Valid values are 0-7.  Actual divisor is 2^div
	 */
	public static native void SetClockDivisor(int div);
  
	/**
	 * Enable system clock spread spectrum.
	 *
	 */
	public static native void EnableClockSS();
  
	/**
	 * Sets the external oscillator mode
	 *
	 * @param mode Enumerated value of oscillator mode
	 */
	public static native void SetExtOscMode(int mode);
  
	/**
	 * Sets the main clock source
	 *
	 * @param source Enumerated value of clock source
	 */
	public static native void SetClockSource(int source);
  

}